package io.renren.modules.app.utils;

import java.io.IOException;
import java.util.Map;

import io.renren.modules.app.entity.nosql.LcPdfTemplate;
import jodd.bean.BeanTemplateParser;
import lombok.AllArgsConstructor;
import lombok.Data;

/**
 * freemark渲染
 */
@Data
@AllArgsConstructor
public class FkUtil {
	private Map<String, Object> params;
	private LcPdfTemplate lcTemplate;

	public String render() throws IOException {
		return new BeanTemplateParser().of(params).parse(lcTemplate.getHtml());
	}
}
